

<?php
/*
 * TODO : Delete all session 
 * TODO : Save Button for each orders
 * TODO : Insert all into Orders database
 * TODO : Print Button 
 * Todo : Load Orders 
 * TODO : list tables
 * TODO : Update Button
 * 
 * 
 */
//session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
  
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Orders Content</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />    

</head>

<body>
<script language="javascript" type ="text/javascript">

    function DeleteFromOrders(str)
    {
                var xmlhttp;
                
//    //        Possibily not required
            if (str=="")
              {
              document.getElementById("Shoppingcart").innerHTML="";
              return;
              }
                if (window.XMLHttpRequest)
                  {// code for IE7+, Firefox, Chrome, Opera, Safari
                    xmlhttp=new XMLHttpRequest();
                  }
                else
                  {// code for IE6, IE5
                    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                  }
     xmlhttp.onreadystatechange=function()
        {
          if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                document.getElementById("Shoppingcart").innerHTML=xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET","ShoppingCart.php?Status=DEL&ProductID="+str+"&QTY=1",true);
        xmlhttp.send();
      

    }
	function addToOrders(str)
    {
                var xmlhttp;
                
//    //        Possibily not required
            if (str=="")
              {
              document.getElementById("Shoppingcart").innerHTML="";
              return;
              }
                if (window.XMLHttpRequest)
                  {// code for IE7+, Firefox, Chrome, Opera, Safari
                    xmlhttp=new XMLHttpRequest();
                  }
                else
                  {// code for IE6, IE5
                    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                  }
     xmlhttp.onreadystatechange=function()
        {
          if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                document.getElementById("Shoppingcart").innerHTML=xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET","ShoppingCart.php?Status=ADD&ProductID="+str+"&QTY=1",true);
        xmlhttp.send();
      

    }
    
$(function() {
$( "#tabs" ).tabs();
});
  

</script>
    <div id="Selector">
        <?php 
        include ('content.php');
        ?>
    </div>
    
    <div id ="Shoppingcart">
        <?php
       // include ('shoppingcartinterface.php');
        ?>
        
        
    </div>
    
        
</body>
</html>